package bbalgae.swing.outline;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class J07_HelloswingActionListener implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		
		//이벤트발생시킨 대상구분
		//System.out.println(e.getActionCommand());
		System.out.println(e.getSource());
		switch(e.getActionCommand()){
		case "new" : JOptionPane.showMessageDialog(null, "new 메뉴 클릭됨");                      break;
		case "close" :  JOptionPane.showMessageDialog(null, "close 메뉴 클릭됨");break;
		case "exit" : System.exit(0); break;
		
		}
		
	}
	

}
